package com.zs.source.aop;


import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author zhshuo
 * @date 2021/07/16 10:53
 **/
@Aspect
@Component
public class AopAspectj {

	@Pointcut("execution(* com.zs.source.aop..*.*(..))")
	public void aopMethod(){
	}

	@Before("aopMethod()")
	public void before(){
		System.out.println("前置通知=========");
	}

	@PostConstruct
	public void initMethod(){
		System.out.println("~~~");
	}

}
